2025-03-23 02:00:47,761 - INFO - Num classes: 3
2025-03-23 02:06:44,580 - INFO - Class weights: tensor([0.5161, 4.2842, 1.2065], device='cuda:0')
2025-03-23 02:06:44,634 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-03-23 02:06:44,635 - INFO - Using cuda device
2025-03-23 02:15:55,150 - INFO - Epoch: 0/100. Training time: 365.958
2025-03-23 02:15:55,152 - INFO - Training Metrics...
2025-03-23 02:15:55,153 - INFO - {'loss': 0.858363267702934, 'f1': 51.992082663768436, 'acc': 58.27019660027474, 'precision': 57.044539183790654, 'recall': 61.994894479513285, 'balanced acc': 61.994894479513285}
2025-03-23 02:15:55,153 - INFO - Validation Metrics... Inference time: 184.549
2025-03-23 02:15:55,153 - INFO - {'loss': 0.7305676386326174, 'f1': 69.08076110611702, 'acc': 73.06617415557997, 'precision': 71.43300522120931, 'recall': 74.02715224399343, 'balanced acc': 74.02715224399343}
2025-03-23 02:15:55,153 - INFO - ==================================================
2025-03-23 03:01:20,015 - INFO - Epoch: 5/100. Training time: 352.998
2025-03-23 03:01:20,018 - INFO - Training Metrics...
2025-03-23 03:01:20,019 - INFO - {'loss': 0.5926975607872009, 'f1': 68.76429228629866, 'acc': 78.96252626651622, 'precision': 68.05795948525792, 'recall': 77.91967657500005, 'balanced acc': 77.91967657500005}
2025-03-23 03:01:20,019 - INFO - Validation Metrics... Inference time: 186.383
2025-03-23 03:01:20,019 - INFO - {'loss': 0.6464084318921536, 'f1': 72.7713443117539, 'acc': 77.42758149541461, 'precision': 73.15513002861567, 'recall': 75.66248083011898, 'balanced acc': 75.66248083011898}
2025-03-23 03:01:20,019 - INFO - ==================================================
2025-03-23 03:46:28,354 - INFO - Epoch: 10/100. Training time: 350.322
2025-03-23 03:46:28,357 - INFO - Training Metrics...
2025-03-23 03:46:28,358 - INFO - {'loss': 0.5729445050924252, 'f1': 68.2992915385619, 'acc': 78.74345125670462, 'precision': 67.26673158540657, 'recall': 78.24498002391158, 'balanced acc': 78.24498002391158}
2025-03-23 03:46:28,358 - INFO - Validation Metrics... Inference time: 186.480
2025-03-23 03:46:28,358 - INFO - {'loss': 0.6344087387942061, 'f1': 72.79093129724161, 'acc': 77.59918000032292, 'precision': 73.22337280840952, 'recall': 75.37821169102749, 'balanced acc': 75.37821169102749}
2025-03-23 03:46:28,359 - INFO - ==================================================
2025-03-23 04:31:08,762 - INFO - Epoch: 15/100. Training time: 355.550
2025-03-23 04:31:08,765 - INFO - Training Metrics...
2025-03-23 04:31:08,766 - INFO - {'loss': 0.5449014871548383, 'f1': 71.02226837013671, 'acc': 80.73448129251702, 'precision': 69.34335380898511, 'recall': 79.15443673483543, 'balanced acc': 79.15443673483543}
2025-03-23 04:31:08,766 - INFO - Validation Metrics... Inference time: 186.755
2025-03-23 04:31:08,766 - INFO - {'loss': 0.6609655022621155, 'f1': 72.43716515647944, 'acc': 76.84981775542495, 'precision': 72.93895632187795, 'recall': 75.9940996857537, 'balanced acc': 75.9940996857537}
2025-03-23 04:31:08,766 - INFO - ==================================================
2025-03-23 05:16:20,354 - INFO - Epoch: 20/100. Training time: 355.967
2025-03-23 05:16:20,356 - INFO - Training Metrics...
2025-03-23 05:16:20,358 - INFO - {'loss': 0.5834263119942102, 'f1': 68.11333170804008, 'acc': 78.33356073799712, 'precision': 67.3817656990929, 'recall': 78.04658817634191, 'balanced acc': 78.04658817634191}
2025-03-23 05:16:20,358 - INFO - Validation Metrics... Inference time: 187.752
2025-03-23 05:16:20,358 - INFO - {'loss': 0.6857926151420497, 'f1': 70.40064461134811, 'acc': 74.74482227622062, 'precision': 70.98676457379763, 'recall': 74.7420074987398, 'balanced acc': 74.7420074987398}
2025-03-23 05:16:20,358 - INFO - ==================================================
2025-03-23 06:01:18,424 - INFO - Epoch: 25/100. Training time: 350.440
2025-03-23 06:01:18,427 - INFO - Training Metrics...
2025-03-23 06:01:18,428 - INFO - {'loss': 0.5419291456540426, 'f1': 70.66150804638268, 'acc': 79.60930090185113, 'precision': 69.21902241744992, 'recall': 80.28669610030761, 'balanced acc': 80.28669610030761}
2025-03-23 06:01:18,428 - INFO - Validation Metrics... Inference time: 186.045
2025-03-23 06:01:18,428 - INFO - {'loss': 0.6423650595206248, 'f1': 72.21278127378352, 'acc': 76.73064231626195, 'precision': 72.54219402152616, 'recall': 75.73620375827214, 'balanced acc': 75.73620375827214}
2025-03-23 06:01:18,428 - INFO - ==================================================
2025-03-23 06:46:10,304 - INFO - Epoch: 30/100. Training time: 352.679
2025-03-23 06:46:10,307 - INFO - Training Metrics...
2025-03-23 06:46:10,308 - INFO - {'loss': 0.51244750389686, 'f1': 73.19499059524956, 'acc': 82.90103451236264, 'precision': 72.117388569921, 'recall': 81.50541112177805, 'balanced acc': 81.50541112177805}
2025-03-23 06:46:10,308 - INFO - Validation Metrics... Inference time: 185.724
2025-03-23 06:46:10,308 - INFO - {'loss': 0.604190326189693, 'f1': 73.30627580784852, 'acc': 77.96409802053734, 'precision': 73.58882590150697, 'recall': 76.1948185733987, 'balanced acc': 76.1948185733987}
2025-03-23 06:46:10,308 - INFO - ==================================================
2025-03-23 07:30:59,734 - INFO - Epoch: 35/100. Training time: 351.157
2025-03-23 07:30:59,736 - INFO - Training Metrics...
2025-03-23 07:30:59,738 - INFO - {'loss': 0.5148909122515948, 'f1': 72.22777429434116, 'acc': 81.2897830406201, 'precision': 70.58047782965457, 'recall': 81.1622151217697, 'balanced acc': 81.1622151217697}
2025-03-23 07:30:59,738 - INFO - Validation Metrics... Inference time: 186.855
2025-03-23 07:30:59,738 - INFO - {'loss': 0.6053497813924958, 'f1': 73.3541928322681, 'acc': 77.92698814098425, 'precision': 73.81270093427028, 'recall': 76.23022941764248, 'balanced acc': 76.23022941764248}
2025-03-23 07:30:59,738 - INFO - ==================================================
2025-03-23 08:16:07,089 - INFO - Epoch: 40/100. Training time: 356.041
2025-03-23 08:16:07,092 - INFO - Training Metrics...
2025-03-23 08:16:07,093 - INFO - {'loss': 0.5384037173711337, 'f1': 71.28691162974738, 'acc': 80.73996200042517, 'precision': 69.36728653858049, 'recall': 79.84629502307907, 'balanced acc': 79.84629502307907}
2025-03-23 08:16:07,093 - INFO - Validation Metrics... Inference time: 188.421
2025-03-23 08:16:07,093 - INFO - {'loss': 0.6372341317466542, 'f1': 72.30550308320383, 'acc': 76.60480677634979, 'precision': 72.86935246636278, 'recall': 76.11099513270591, 'balanced acc': 76.11099513270591}
2025-03-23 08:16:07,093 - INFO - ==================================================
2025-03-23 09:01:06,947 - INFO - Epoch: 45/100. Training time: 351.487
2025-03-23 09:01:06,949 - INFO - Training Metrics...
2025-03-23 09:01:06,951 - INFO - {'loss': 0.5727226734161377, 'f1': 68.8698571264629, 'acc': 79.5951072736787, 'precision': 67.51309469057193, 'recall': 78.59633250428894, 'balanced acc': 78.59633250428894}
2025-03-23 09:01:06,951 - INFO - Validation Metrics... Inference time: 186.461
2025-03-23 09:01:06,951 - INFO - {'loss': 0.6040991159934032, 'f1': 72.96375410213581, 'acc': 77.66096252583313, 'precision': 73.12617227626512, 'recall': 76.01454164958115, 'balanced acc': 76.01454164958115}
2025-03-23 09:01:06,951 - INFO - ==================================================
2025-03-23 09:47:42,342 - INFO - Epoch: 50/100. Training time: 356.294
2025-03-23 09:47:42,344 - INFO - Training Metrics...
2025-03-23 09:47:42,346 - INFO - {'loss': 0.5039960925395672, 'f1': 72.05972695568613, 'acc': 82.1553388482797, 'precision': 70.70180475365693, 'recall': 81.714630082488, 'balanced acc': 81.714630082488}
2025-03-23 09:47:42,346 - INFO - Validation Metrics... Inference time: 188.107
2025-03-23 09:47:42,346 - INFO - {'loss': 0.5800628179236303, 'f1': 73.69608178878975, 'acc': 78.38060659390338, 'precision': 74.01270479443207, 'recall': 76.37337824826405, 'balanced acc': 76.37337824826405}
2025-03-23 09:47:42,346 - INFO - ==================================================
2025-03-23 10:23:50,756 - INFO - Early stopping criterion met. Stopping training.
2025-03-23 10:23:51,542 - INFO - Initializing final Evaluations:

2025-03-23 10:26:52,276 - INFO - Final validation metrics:
{'f1': 75.27020037517057, 'acc': 79.09073983628262, 'precision': 74.11974281392816, 'recall': 77.30783795190099, 'balanced acc': 77.30783795190099}
2025-03-23 10:29:01,949 - INFO - Final test pixel-wise classification metrics:
{'f1': 79.85345906189325, 'acc': 82.67348407696859, 'precision': 79.4897933329959, 'recall': 81.82466080799526, 'balanced acc': 81.82466080799526}
2025-04-05 02:25:28,415 - INFO - Num classes: 3
2025-04-05 02:25:28,419 - INFO - Class weights: None
2025-04-05 02:26:14,303 - INFO - Num classes: 3
2025-04-05 02:26:14,303 - INFO - Class weights: None
2025-04-05 02:26:14,480 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-04-05 02:26:14,480 - INFO - Using cuda device
2025-04-05 02:26:14,503 - INFO - Initializing final Evaluations:

